/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package org.sysdance.aplicativo.visao.tela;

import org.sysdance.aplicativo.util.visao.JanelaDialogo;

/**
 *
 * @author gocard
 */
public  class TelaSala extends JanelaDialogo {

    /**
     * Creates new form TelaSala
     */
    public TelaSala(java.awt.Frame parent , boolean modal) {
        super(parent, modal);
        this.setTitle("SysDance - Sala:");
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanelSala = new javax.swing.JPanel();
        jblNomedaSala = new javax.swing.JLabel();
        tfNomeSala = new javax.swing.JTextField();
        btnSalvarSala = new javax.swing.JButton();
        btnSairSala = new javax.swing.JButton();

        jPanelSala.setBorder(javax.swing.BorderFactory.createTitledBorder("Sala:"));

        jblNomedaSala.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jblNomedaSala.setText("Nome:");

        btnSalvarSala.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sysdance/aplicativo/imagens/salvar.png"))); // NOI18N
        btnSalvarSala.setText("Salvar");
        btnSalvarSala.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSalvarSalaActionPerformed(evt);
            }
        });

        btnSairSala.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/sysdance/aplicativo/imagens/fechar.png"))); // NOI18N
        btnSairSala.setText("Cancelar");
        btnSairSala.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSairSalaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanelSalaLayout = new javax.swing.GroupLayout(jPanelSala);
        jPanelSala.setLayout(jPanelSalaLayout);
        jPanelSalaLayout.setHorizontalGroup(
            jPanelSalaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelSalaLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelSalaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelSalaLayout.createSequentialGroup()
                        .addComponent(jblNomedaSala)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addComponent(tfNomeSala)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelSalaLayout.createSequentialGroup()
                        .addGap(0, 302, Short.MAX_VALUE)
                        .addComponent(btnSairSala)
                        .addGap(40, 40, 40)
                        .addComponent(btnSalvarSala)))
                .addContainerGap())
        );
        jPanelSalaLayout.setVerticalGroup(
            jPanelSalaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelSalaLayout.createSequentialGroup()
                .addGap(26, 26, 26)
                .addComponent(jblNomedaSala)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(tfNomeSala, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 59, Short.MAX_VALUE)
                .addGroup(jPanelSalaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnSalvarSala, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btnSairSala, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(35, 35, 35))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanelSala, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanelSala, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnSairSalaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSairSalaActionPerformed
        // TODO add your handling code here:
        
        super.fecharJanela();
    }//GEN-LAST:event_btnSairSalaActionPerformed

    private void btnSalvarSalaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSalvarSalaActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnSalvarSalaActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(TelaSala.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(TelaSala.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(TelaSala.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(TelaSala.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                TelaSala dialog = new TelaSala(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                    @Override
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnSairSala;
    private javax.swing.JButton btnSalvarSala;
    private javax.swing.JPanel jPanelSala;
    private javax.swing.JLabel jblNomedaSala;
    private javax.swing.JTextField tfNomeSala;
    // End of variables declaration//GEN-END:variables
}
